import requests

# 接口URL
url = "http://119.8.2.72:8081/openai"


def prompt_gpt3(txt):
    # 接口参数
    params = {
        "username": "admin",
        "password": "123456",
        "content": txt  # 替换为实际的内容
    }

    # 发送GET请求
    response = requests.get(url, params=params)
    # 检查响应状态码
    if response.status_code == 200:
        # 返回内容
        return response.text
    else:
        return f"请求失败，状态码：{response.status_code}"


print(prompt_gpt3("what is the capital of China?"))
